<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>position方式(兼容性最好)</title>
  <style>
    .outer {
      position:relative;
    }
    .side {
      position: absolute;
      height: 300px;
      top: 0px;
    }
    .left {
      width: 300px;
      left: 0;
      background-color: lightcyan;
    }
    .right {
      width: 300px;
      right: 0px;
      background-color: lightgreen;
    }
    .mid {
      right: 300px;
      left: 300px;
      background-color: lightpink;
    }
  </style>
</head>
<body>
  <div class="outer">
    <div class="side left">left</div>
    <div class="side mid">mid</div>
    <div class="side right">right</div>
  </div>
</body>
</html>